GEN1 Automation Studio

On this page:

Pass Data Between Gen1 Tasks

Passing Data Between Tasks

In this section you will add another task to your automation and pass variable data to it.

Note: This section uses the Gen1 Automation Builder canvas.

Prepare the Canvas

Let's prepare the workflow canvas by adding another task.

  1. Go back to the Automation Studio tab.

    • If you closed the application tab, simply go to the IAP home screen and click the Automation Studio menu option from the left navigation menu.
    • Select Find an Automation and search for the "EnlightenMe" automation you created previously.
  2. Click the green transition line between the FetchFact and End tasks.

  3. Either press the "delete" button on your keyboard, or click the trashcan icon in the upper-right corner of the canvas to delete the green transition line.

  4. In the Task Menu Sidebar, search for "Query" and add it to your canvas.

  5. Add a transition between the FetchFact and Query tasks, and then add another between the Query and End tasks.

You should now have four different (yet connected) tasks on your canvas:

  • START
  • FetchFact
  • Query
  • END

Figure 1. Add Query Task

10-EnlightenMe

Configure the Query Task

Next, let's configure the variable information.

  1. Double-click the Query task to open the configuration window for it.

  2. Change the Summary field to read "IsolateFact".

  3. Change the Description field to read "Just give me the fact".

  4. For this example, set the Reference variable for pass_on_null to False. This tells the automation to "fail" the task in Job Manager if no value is provided.

  5. Set the query Reference variable to value.joke.

    • For this step, go back to the Job Manager tab you left open. Refer to the response variable in the OUTGOING tab of the Task History. The response was provided in the form of a JSON object.
    • In the JASONPath syntax of the response, find where value.joke exists as a key-value pair.

    Note: For more information on JSONPath syntax, we recommend reading JSONPath-XPath for JSON. We also recommend the JSONPath Online Evaluator when experimenting with JSONPath data extraction.

  6. Change the obj Reference task from "static" to FetchFact and accept the default response that displays. This indicates the data you want to search will be provided by the results of the FetchFact task.

  7. Click SAVE (lower-left corner) to close the Query task configuration window.

  8. Click SAVE on the workflow canvas to save the entire automation.

  9. Hover over the Query task to show the tooltip "Just give me the fact".

Run the Automation

To test run the automation:

  1. Go to the upper-right corner of the canvas, click the blue play arrow (►) to the right of the Automation Name. A modal window will open.

  2. Click the START button in the left corner of the modal. A new Run Automation modal window will appear in the center of the screen indicating that the job has run.

  3. Within the Run Automation modal window, there's a link that reads VIEW JOB. Once you click the link, a new tab opens in your browser. This new tab displays the Job Manager view of the running job you just started.

  4. Find the name of the job you initiated in the list and click on it. The job view will open.

  5. This time, two tasks are displayed:

    • IsolateFact
    • FetchFact


    Figure 2. Job Manager Details

    11-EnlightenMe

  6. Click the book icon at the end of the IsolateFact task.

  7. The Outgoing tab in the Task History reveals the value of the return_data variable, indicating that you successfully isolated the incoming fact from the data that was returned by the Query task.

    Figure 3. Outgoing Task History

    12-EnlightenMe

Summary Wrap-Up

Congratulations on completing this segment of the tour! By now, you should know how to:

  • Build an automation.
  • Pass variable data between tasks in an automation.
  • Use the Query task.

In the next section, you will learn how to customize the input values.